<template>
  <div class="left">
    <template v-for="(item, index) in typeArr">
      <span
        @click="tabClick(index, item)"
        :class="tabIndex === index ? 'active' : ''"
        :key="item.id"
      >
        {{ item }}
      </span>
    </template>
  </div>
</template>

<script>
export default {
  props: ['typeArr', 'tabIndex'],
  methods: {
    tabClick(index, item) {
      this.$emit('tabClick', { index, item })
    },
  },
}
</script>

<style></style>
